/*
 * @Descripttion: 
 * @version: 
 * @Author: TT
 * @Date: 2023-03-24 22:38:38
 * @LastEditors: TT
 * @LastEditTime: 2023-05-16 17:46:35
 */

import 'package:flutter/material.dart';
import 'package:hzy_common_module/config/normal_configs.dart';
import 'package:hzy_common_module/utils/screenutil_tools.dart';
import 'package:hzy_normal_tool/hzy_normal_base/hzy_base_less.dart';
import '../config/hzy_common_color_config.dart';
import 'common_place_holder_widget.dart';
import 'common_widgets.dart';

abstract class CommonLessV extends HzyBaseLess {
  final CommonPlaceHoldType? placeHoldType;
  final String? placeMsg;

  CommonLessV({super.key, this.placeMsg, this.placeHoldType});
  @override
  Color? get backgroundColor => HzyCommonColor().whitebackgroundColor;
  @override
  String? get title => configAppBarTitle();
  @override
  bool get isAddPopScope => PageNormalConfig.configIsAddPopScope;
  @override
  Widget? createEmptyWidget() {
    return CommonPlaceHoldPage(
      placeHoldType: placeHoldType ?? CommonPlaceHoldType.nothing,
      msg: placeMsg,
      ontap: () {
        tapPlaceHoldWidgetMethod(
          placeHoldType: placeHoldType ?? CommonPlaceHoldType.nothing,
        );
      },
    );
  }

  configAppBarTitle() {
    return null;
  }

  @override
  Widget? createFlexBleSpace() {
    return configNavImageBg();
  }

  @override
  Widget? createLoadingWidget() {
    return configLoadWidget();
  }

  @override
  configPrferredheight() {
    return SizeMacro.navh - SizeMacro.statusBarHeight;
  }

  @override
  configBoxDecoreation() {
    return BoxDecoration(
      color: HzyCommonColor().backgroudgrey,
    );
  }

  @override
  Color? createAppBarTextColor() {
    return HzyCommonColor().col000000;
  }

  @override
  Color? createLeadingIconColor() {
    return HzyCommonColor().col000000;
  }

  /// =============== 网络事件 =============== ///

  /// =============== 触发事件 =============== ///
  ///
  ///   // 点击缺省页触发事件
  tapPlaceHoldWidgetMethod({
    required CommonPlaceHoldType placeHoldType,
  }) {}
}
